<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * 素材分类表
 */
class CreateWxMaterialCategory extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //微信带参数二维码分组
        Schema::create('wx_material_categorys', function (Blueprint $table) {
            $table->increments('cat_id')->comment('自增序号');
            $table->string('material_type', 20)->default('')->comment('素材类别');
            $table->string('parent_id', 10)->default('')->comment('分组键名');
            $table->string('name', 50)->default('')->comment('分组名称');
            $table->text('description')->comment('分组描述');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wx_material_categorys');
    }
}
